//
//  ViewController.swift
//  002-第一个应用程序
//
//  Created by luojie on 2018/2/28.
//  Copyright © 2018年 luojie. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        let v = UIView(frame: CGRect(x:0,y:20,width:100,height:100))
        
        v.backgroundColor = UIColor.red
        
        view.addSubview(v)
        
        let btn = UIButton(type: .contactAdd)
        
        v.addSubview(btn)
        
        btn.addTarget(self, action: #selector(clickMe), for: .touchUpInside)
    }
    func clickMe()->(){
        print("123")
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

